package speelotheek.components;

import speelotheek.views.Customers;
import speelotheek.views.Products;
import speelotheek.views.Uitleningen;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import java.awt.Font;

public class TabbedPane extends JPanel 
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -480582770313679451L;
	protected static Products products;
	protected static Customers customers;
	protected static Uitleningen uitleningen;
	
	/**
	 * Create the panel.
	 */
	public TabbedPane() 
	{
		setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setFont(new Font("Tahoma", Font.PLAIN, 14));
		add(tabbedPane);
		
		products = new Products();
		customers = new Customers();
		uitleningen = new Uitleningen();
		
		// De views Products en Customers worden hier aan de tab toegevoegd
		tabbedPane.addTab("<html><body marginwidth=50>Speelgoed</body></html>", new ImageIcon(TabbedPane.class.getResource("/speelotheek/resources/carton_48.png")), products, null);
		tabbedPane.addTab("<html><body marginwidth=50>Leden</body></html>", new ImageIcon(TabbedPane.class.getResource("/speelotheek/resources/user_48.png")), customers, null);
		tabbedPane.addTab("<html><body marginwidth=50>Uitleningen</body></html>", new ImageIcon(TabbedPane.class.getResource("/speelotheek/resources/id_48.png")), uitleningen, null);
	}

}
